As far as I know you cannot use the same library for arm64 iPhone and iPhone Simulator and instead you have to link each one based on the platform you're building.
The best way I've found to do this is using the Other Linker Flags and then add an option for "Any iOS Simulator SDK" and "Any iOS SDK." Then you use -lname_of_library to specify if you want to use an iPhone version or an iPhone Simulator version.
I use a .xcconfig file to accomplish this. Here's a working example of linking to fmod for either simulator or device:
OTHER_LD_FLAGS_SIMULATOR = $(DEFAULT_OTHER_LD_FLAGS) -lfmodL_iphonesimulator
OTHER_LD_FLAGS_DEVICE = $(DEFAULT_OTHER_LD_FLAGS) -lfmodL_iphoneos
OTHER_LD_FLAGS = $(DEFAULT_OTHER_LD_FLAGS)
OTHER_LD_FLAGS[sdk=iphoneos*] = $(OTHER_LD_FLAGS_DEVICE)
OTHER_LD_FLAGS[sdk=iphonesimulator*] = $(OTHER_LD_FLAGS_SIMULATOR)
Hope this helps.
References:
https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: